Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] product_code_mandatory #1575

Closed
wants to merge 34 commits into from

Conversation

MarioLM-23
Copy link

@MarioLM-23 MarioLM-23 commented Apr 9, 2024

Improve test classes with setUpClass.
Last PR closed of migration module: #1237.
Checked two last issues.

agyamuta and others added 30 commits April 8, 2024 11:09
* [ADD] Module to set the  internal reference of the product as required.
Currently translated at 100.0% (3 of 3 strings)

Translation: product-attribute-12.0/product-attribute-12.0-product_code_mandatory
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_code_mandatory/pt/
Currently translated at 83.3% (5 of 6 strings)

Translation: product-attribute-14.0/product-attribute-14.0-product_code_mandatory
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_code_mandatory/fr/
Currently translated at 83.3% (5 of 6 strings)

Translation: product-attribute-14.0/product-attribute-14.0-product_code_mandatory
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_code_mandatory/fr_FR/
Currently translated at 100.0% (2 of 2 strings)

Translation: product-attribute-15.0/product-attribute-15.0-product_code_mandatory
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_code_mandatory/ca/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-15.0/product-attribute-15.0-product_code_mandatory
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_code_mandatory/
mymage and others added 2 commits April 8, 2024 11:09
Currently translated at 100.0% (3 of 3 strings)

Translation: product-attribute-15.0/product-attribute-15.0-product_code_mandatory
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_code_mandatory/it/
@MarioLM-23 MarioLM-23 mentioned this pull request Apr 9, 2024
58 tasks
@MarioLM-23 MarioLM-23 marked this pull request as ready for review April 15, 2024 06:56
@mgc-adhoc
Copy link

LGTM Functional +1 @agyamuta @pedrocasi

@bruno-zanotti
Copy link

Hey @mariobinhex could you squash migration commits?

Move setUp test class to setUpClass for better performant

[ADD] product_code_mandatory: Add contributors

[IMP] product_cost_security: clarify product cost edit required permissions

As seen in OCA/margin-analysis#198 (review), a user needs some other group that grants them permissions for editing products, apart from this one that allows them to edit product cost.

This might not seem obvious to the user, so it's better to document it.

Btw, I renamed the groups to be shorter. Still easy to understand, now that groups are grouped (🥁).

@moduon MT-5158

[UPD] Update product_cost_security.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/
@MarioLM-23 MarioLM-23 force-pushed the 16.0-mig-product_code_mandatory branch from bdccb55 to e0aa2d2 Compare May 2, 2024 13:13
@MarioLM-23
Copy link
Author

Hey @mariobinhex could you squash migration commits?

Done! I have maintained the pre-commit and migration

@mgc-adhoc
Copy link

@OCA/product-maintainers could you please merge?
Thanks!

@florenciafrigieri2
Copy link

@rafaelbn Hello Rafal, can you please check this PR?

@jcadhoc
Copy link

jcadhoc commented Jul 16, 2024

@rafaelbn hi Rafael, can you please check this PR and merge?

@jcadhoc
Copy link

jcadhoc commented Jul 16, 2024

@simahawk hi Simone, can you please check this PR and merge? Thank you!

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contrib.
Please check your history.
The migration commit contains changes to other modules and there's a merge commit that shouldn't be there.

Please, rebase on 16.0 instead and re-apply the migration commits.

return self.env["ir.sequence"].next_by_code("product.default.code")

default_code = fields.Char(
"Internal Reference", index=True, default=_get_default_code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Internal Reference", index=True, default=_get_default_code
"Internal Reference", index=True, default=lambda self: self._get_default_code()

To be done in a separated commit that can be back/fwd ported

Comment on lines +3 to +6
from odoo.tests.common import TransactionCase


class TestProductCode(TransactionCase):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from odoo.tests.common import TransactionCase
class TestProductCode(TransactionCase):
from odoo.tests.common import BaseCommon
class TestProductCode(BaseCommon):

to disable tracking

@simahawk
Copy link
Contributor

/ocabot migration product_code_mandatory

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jul 18, 2024
@ced-adhoc
Copy link

Hi @MarioLM-23
Have you had a chance to address the request on the pr?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.